{template file="cms/header.html"/}
<script type="text/javascript">
//全局变量
var GV = {
    'site':{$site|raw|json_encode},
    'image_upload_url': '{$image_upload_url ? $image_upload_url : url("member/ajax/upload", ["dir" => "images"])}',
    'file_upload_url': '{$file_upload_url ? $file_upload_url : url("member/ajax/upload", ["dir" => "files"])}',
    'attachment_select_url': '{$attachment_select_url ? $attachment_select_url : url("member/attachments/select")}',
};
</script>
<link rel="stylesheet" href="__STATIC__/libs/layui/css/layui.css">
<script src="__STATIC__/libs/layui/layui.js"></script>
<style type="text/css">
body {background: #f6f6f6; }
form .verify-box input {display: inline-block; width: 60%; }
form .verify-box img {display: inline-block; margin-left: 2%; height: 38px; }
.layui-form-label {width: 110px;}
.layui-input-block {margin-left: 140px;max-width:70%;}
.layui-form-mid2{display: block; padding: 9px 0!important; line-height: 20px; margin-right: 10px; padding-left: 140px !important; }
.layui-form-item-required:before {display: inline-block; margin-right: 4px; color: #f5222d; font-size: 14px; font-family: SimSun,sans-serif; line-height: 1; content: "*"; }
.layui-form-item>label.layui-form-label:after {content: ":"; position: relative; top: -.5px;margin-left: 2px;}
</style>
<div class="headline-bg"></div>
<div class="main">
    <div class="w1200">
        <div class="container-top">
            <h2>自定义表单<span>message</span></h2>
            <!-- 面包屑 -->
            <div class="bread-nav">
                <a href="">首页</a>&gt; 自定义表单
            </div>
        </div>
        <div class="content">
            <form class="layui-form" method="post" action="{:url('index/formguide/post')}">
            	{:token()}
                <input type="hidden" name="id" value="{$id}" />
                {include file="formguide/inputItem" /}
                {if count($fieldList)}
                {if $modelInfo.setting.isverify}
                <div class="layui-form-item verify-box">
                    <label class="layui-form-label layui-form-item-required">验证码</label>
                    <div class="layui-input-block">
                        <input type="text" name="captcha" placeholder="验证码*" value="" class="layui-input" style="max-width:200px;">
                        <img id="verify" src="{:captcha_src()}" title="点击刷新" alt="验证码" class="captcha">
                    </div>
                </div>
                {/if}
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn">立即提交</button>
                    </div>
                </div>
                {/if}
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
//刷新验证码
$("#verify").click(function() {
    var verifyimg = $("#verify").attr("src");
    $("#verify").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
});
</script>
{template file="cms/footer.html"/}